package handler

import (
	"github.com/go-playground/validator/v10"
)

// 自定义验证器
type validHandler struct{}

var ValidHandler validHandler

// 唯一邮件
func (v *validHandler) UniqueEmail() validator.Func {
	return func(fl validator.FieldLevel) bool {
		// 接收数据
		_, _ = fl.Field().Interface().(string)

		return false
	}
}
